package demo.channel;

import demo.mode.IPayMode;

import java.math.BigDecimal;

/**
 * 支付渠道
 * @author ZhouWeiBo
 * @create 2022/6/8
 */
public abstract class AbstractPayChannel {
    protected IPayMode payMode;

    public AbstractPayChannel(IPayMode payMode) {
        this.payMode = payMode;
    }

    private AbstractPayChannel() {}

    /**
     * 执行支付操作
     */
    public abstract boolean pay(String userId, Object identity, BigDecimal money);
}
